[#ftl]
<!-- Left side column. contains the logo and sidebar -->
<aside class="main-sidebar">

    <!-- sidebar: style can be found in sidebar.less -->
    <section class="sidebar">

        <!-- Sidebar Menu -->
        <ul class="sidebar-menu">
            <li class="header">后台管理系统</li>
            <!-- Optionally, you can add icons to the links -->
            <li [#if sidebar == "main"]class="active"[/#if]><a href="/main"><i class="fa fa-dashboard"></i>
                <span>控制台首页</span></a></li>
        [@shiro.hasPermission name="customers:view"]
            <li [#if treeview == "customer"]class="treeview active"[#else]class="treeview"[/#if]>
                <a href="#"><i class="fa fa-cog"></i> <span>客户管理</span> <i class="fa fa-angle-left pull-right"></i></a>
                <ul class="treeview-menu">
                    [@shiro.hasPermission name="customers:view"]
                        <li [#if sidebar == "customers"]class="active"[/#if]><a href="/customers"><i class="fa fa-user"></i>客户列表</a>
                        </li>
                    [/@shiro.hasPermission]
                </ul>
            </li>
        [/@shiro.hasPermission]
            <li [#if treeview == "userInfo"]class="treeview active"[#else]class="treeview"[/#if]>
                <a href="#"><i class="fa fa-user-secret"></i> <span>个人信息</span> <i
                        class="fa fa-angle-left pull-right"></i></a>
                <ul class="treeview-menu">
                    <li [#if sidebar == "changePassword"]class="active"[/#if]><a href="/changePassword"><i
                            class="fa fa-user"></i>修改密码</a></li>
                </ul>
            </li>
        [@shiro.hasPermission name="system:view"]
            <li [#if treeview == "system"]class="treeview active"[#else]class="treeview"[/#if]>
                <a href="#"><i class="fa fa-cog"></i> <span>系统管理</span> <i class="fa fa-angle-left pull-right"></i></a>
                <ul class="treeview-menu">
                    [@shiro.hasPermission name="system:sys_user:list"]
                        <li [#if sidebar == "users"]class="active"[/#if]><a href="/users"><i class="fa fa-user"></i>用户管理</a>
                        </li>
                    [/@shiro.hasPermission]
                    [@shiro.hasPermission name="system:sys_role:list"]
                        <li [#if sidebar == "roles"]class="active"[/#if]><a href="/roles"><i
                                class="fa fa-list"></i>角色管理</a></li>
                    [/@shiro.hasPermission]
                    [@shiro.hasPermission name="system:sys_permission:list"]
                        <li [#if sidebar == "permissions"]class="active"[/#if]><a href="/permissions"><i
                                class="fa fa-list"></i>权限列表</a></li>
                    [/@shiro.hasPermission]
                    [@shiro.hasPermission name="system:sys_log:list"]
                        <li [#if sidebar == "syslogs"]class="active"[/#if]><a href="/syslogs"><i
                                class="fa fa-list-alt"></i>操作日志</a></li>
                    [/@shiro.hasPermission]
                </ul>
            </li>
        [/@shiro.hasPermission]
        </ul>
        <!-- /.sidebar-menu -->
    </section>
    <!-- /.sidebar -->
</aside>